import request from '@/utils/request'

// 查询生成表数据
export function findDefense(data) {
  console.log(data)
  return request({
    url: '/base-distribution/findefense',
    method: 'post',
    data
  })
}

export function findface(data) {
  return request({
    url: '/es/api/face/all',
    method: 'post',
    data
  })
}

export function adddefense(data) {
  return request({
    url: '/base-distribution/add',
    method: 'post',
    data
  })
}

export function findcount() {
  return request({
    url: '/base-sixreal/population/findcount',
    method: 'post',
  })
}

export function findlastTime(data) {
  return request({
    url: '/base-sixreal/population/findlasttime',
    method: 'post',
    data
  })
}

export function upddefence(data) {
  return request({
    url: '/base-distribution/update',
    method: 'post',
    data
  })
}



export function updstatu(id) {
  return request({
    url: `/base-distribution/updstatu/${id}`, // 注意这里的变化
    method: 'get',
  })
}

export function updstatu2(id) {
  return request({
    url: `/base-distribution/updstatu2/${id}`, // 注意这里的变化
    method: 'get',
  })
}

/**
 * 布放车辆列表
 * */
export function carlist(data) {
  console.log(data)
  return request({
    url: '/base-distribution/vehicledeployment/carlist',
    method: 'post',
    data
  })
}

/**
 * 人脸识别登录
 */
export function facelogins(image) {
  return request({
    url: '/videoPatrol/recognize-faceDetect/'+image,
    headers: {
      isToken: false,
      repeatSubmit: false
    },
    method: 'post',
  })
}

/**
 * 人脸布控任务计数
 * */
export function togetdeploymentcount(){
  return request({
    url: '/base-distribution/togetcount/',
    method: 'get',
  })
}

export function cherkAll(){
  return request({
    url: '/base-distribution/cherkAll/',
    method: 'get',
  })
}
export function cherkPause(){
  return request({
    url: '/base-distribution/cherkPause/',
    method: 'get',
  })
}

/**
 * 车辆布控任务计数
 * */
export function caradd(){
  return request({
    url: '/base-distribution/vehicledeployment/add',
    method: 'post',
  })
}
export function findequipment(){
  return request({
    url: '/videoPatrol/findequipment',
    method: 'post',
  })
}

/**
 * 车辆布控任务计数
 * */
export function updcarstatu(id){
  return request({
    url: '/base-distribution/vehicledeployment/updstatu/'+id,
    method: 'post',
  })
}
